<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Xiaomi MIOT: Interface: ISecureKey</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<nav>
    <h2><a href="index.html">MIOT SDK</a></h2><h3>Modules</h3><ul><li><a href="module-miot.html">miot</a></li><li><a href="module-miot_Account.html">miot/Account</a></li><li><a href="module-miot_Bluetooth.html">miot/Bluetooth</a></li><li><a href="module-miot_Device.html">miot/Device</a></li><li><a href="module-miot_Host.html">miot/Host</a></li><li><a href="module-miot_host_audio.html">miot/host/audio</a></li><li><a href="module-miot_host_crypto.html">miot/host/crypto</a></li><li><a href="module-miot_host_file.html">miot/host/file</a></li><li><a href="module-miot_host_locale.html">miot/host/locale</a></li><li><a href="module-miot_host_storage.html">miot/host/storage</a></li><li><a href="module-miot_host_ui.html">miot/host/ui</a></li><li><a href="module-miot_Package.html">miot/Package</a></li><li><a href="module-miot_Properties.html">miot/Properties</a></li><li><a href="module-miot_resources.html">miot/resources</a></li><li><a href="module-miot_Service.html">miot/Service</a></li><li><a href="module-miot_service_infra.html">miot/service/infra</a></li><li><a href="module-miot_service_ircontroller.html">miot/service/ircontroller</a></li><li><a href="module-miot_service_scene.html">miot/service/scene</a></li><li><a href="module-miot_service_security.html">miot/service/security</a></li><li><a href="module-miot_service_smarthome.html">miot/service/smarthome</a></li><li><a href="module-miot_service_spec.html">miot/service/spec</a></li><li><a href="module-miot_service_storage.html">miot/service/storage</a></li><li><a href="module-miot_ui.html">miot/ui</a></li><li><a href="module-miot_ui_AMapView.html">miot/ui/AMapView</a></li><li><a href="module-miot_ui_ImageButton.html">miot/ui/ImageButton</a></li><li><a href="module-miot_ui_InputDialog.html">miot/ui/InputDialog</a></li><li><a href="module-miot_ui_LoadingDialog.html">miot/ui/LoadingDialog</a></li><li><a href="module-miot_ui_LocalizedStrings.html">miot/ui/LocalizedStrings</a></li><li><a href="module-miot_ui_MessageDialog.html">miot/ui/MessageDialog</a></li><li><a href="module-miot_ui_MultiChoseDialog.html">miot/ui/MultiChoseDialog</a></li><li><a href="module-miot_ui_NumberSpinner.html">miot/ui/NumberSpinner</a></li><li><a href="module-miot_ui_ProgressDialog.html">miot/ui/ProgressDialog</a></li><li><a href="module-miot_ui_SingleChoseDialog.html">miot/ui/SingleChoseDialog</a></li><li><a href="module-miot_ui_TitleBar.html">miot/ui/TitleBar</a></li><li><a href="module-miot_ui_TitleBarBlack.html">miot/ui/TitleBarBlack</a></li><li><a href="module-miot_ui_TitleBarWhite.html">miot/ui/TitleBarWhite</a></li></ul><h3>Events</h3><ul><li><a href="module-miot_Bluetooth-BluetoothEvent.html#.event:bluetoothCharacteristicDiscovered">bluetoothCharacteristicDiscovered</a></li><li><a href="module-miot_Bluetooth-BluetoothEvent.html#.event:bluetoothCharacteristicDiscoverFailed">bluetoothCharacteristicDiscoverFailed</a></li><li><a href="module-miot_Bluetooth-BluetoothEvent.html#.event:bluetoothCharacteristicValueChanged">bluetoothCharacteristicValueChanged</a></li><li><a href="module-miot_Bluetooth-BluetoothEvent.html#.event:bluetoothConnectionStatusChanged">bluetoothConnectionStatusChanged</a></li><li><a href="module-miot_Bluetooth-BluetoothEvent.html#.event:bluetoothDeviceDiscovered">bluetoothDeviceDiscovered</a></li><li><a href="module-miot_Bluetooth-BluetoothEvent.html#.event:bluetoothDeviceDiscoverFailed">bluetoothDeviceDiscoverFailed</a></li><li><a href="module-miot_Bluetooth-BluetoothEvent.html#.event:bluetoothSeviceDiscovered">bluetoothSeviceDiscovered</a></li><li><a href="module-miot_Bluetooth-BluetoothEvent.html#.event:bluetoothSeviceDiscoverFailed">bluetoothSeviceDiscoverFailed</a></li><li><a href="module-miot_Bluetooth-BluetoothEvent.html#.event:bluetoothStatusChanged">bluetoothStatusChanged</a></li><li><a href="module-miot_Device-DeviceEvent.html#.event:deviceNameChanged">deviceNameChanged</a></li><li><a href="module-miot_Device-DeviceEvent.html#.event:deviceReceivedMessages">deviceReceivedMessages</a></li><li><a href="module-miot_Device-DeviceEvent.html#.event:deviceStatusChanged">deviceStatusChanged</a></li><li><a href="module-miot_Package-PackageEvent.html#.event:packageAuthorizationCancel">packageAuthorizationCancel</a></li><li><a href="module-miot_Package-PackageEvent.html#.event:packageDidLoaded">packageDidLoaded</a></li><li><a href="module-miot_Package-PackageEvent.html#.event:packageDidResume">packageDidResume</a></li><li><a href="module-miot_Package-PackageEvent.html#.event:packageReceivedInformation">packageReceivedInformation</a></li><li><a href="module-miot_Package-PackageEvent.html#.event:packageViewWillAppear">packageViewWillAppear</a></li><li><a href="module-miot_Package-PackageEvent.html#.event:packageWillExit">packageWillExit</a></li><li><a href="module-miot_Package-PackageEvent.html#.event:packageWillLoad">packageWillLoad</a></li><li><a href="module-miot_Package-PackageEvent.html#.event:packageWillPause">packageWillPause</a></li></ul><h3>Namespaces</h3><ul><li><a href="module-miot_Bluetooth-BluetoothEvent.html">BluetoothEvent</a></li><li><a href="module-miot_Device-DeviceEvent.html">DeviceEvent</a></li><li><a href="module-miot_Package-Entrance.html">Entrance</a></li><li><a href="module-miot_Package-PackageEvent.html">PackageEvent</a></li><li><a href="module-miot_resources-Language.html">Language</a></li><li><a href="module-miot_service_scene-SceneType.html">SceneType</a></li></ul><h3>Interfaces</h3><ul><li><a href="module-miot_Account-IAccount.html">IAccount</a></li><li><a href="module-miot_Bluetooth.IBluetooth.html">IBluetooth</a></li><li><a href="module-miot_Bluetooth.IBluetoothCharacteristic.html">IBluetoothCharacteristic</a></li><li><a href="module-miot_Bluetooth.IBluetoothClassic.html">IBluetoothClassic</a></li><li><a href="module-miot_Bluetooth.IBluetoothLE.html">IBluetoothLE</a></li><li><a href="module-miot_Bluetooth.IBluetoothLock.html">IBluetoothLock</a></li><li><a href="module-miot_Bluetooth.IBluetoothService.html">IBluetoothService</a></li><li><a href="module-miot_Device.IDeviceWifi.html">IDeviceWifi</a></li><li><a href="module-miot_Device-IDevice.html">IDevice</a></li><li><a href="module-miot_Properties-IProperties.html">IProperties</a></li><li><a href="module-miot_service_scene.IScene.html">IScene</a></li><li><a href="module-miot_service_security.ISecureKey.html">ISecureKey</a></li></ul>
</nav>

<div id="main">

    <h1 class="page-title">Interface: ISecureKey</h1>

    




<section>

<header>
    
        <h2>
            <span class="ancestors"><a href="module-miot_service_security.html">module:miot/service/security</a>.</span>ISecureKey</h2>
        
            <div class="class-description"><p>安全锁</p></div>
        
    
</header>

<article>
    <div class="container-overview">
    
        

        


<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>


        
    
    </div>

    

    

    

    

    

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<h4 class="name" id="activeTime"><span class="type-signature"></span>activeTime<span class="type-signature"> :long</span></h4>




<div class="description">
    <p>生效时间 UTC时间戳，单位为s, active_time</p>
</div>

<!--

    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">long</span>


        </li>
    </ul>

-->




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






        
            
<h4 class="name" id="deviceID"><span class="type-signature">(readonly) </span>deviceID<span class="type-signature"> :long</span></h4>




<div class="description">
    <p>设备 ID</p>
</div>

<!--

    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">long</span>


        </li>
    </ul>

-->




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






        
            
<h4 class="name" id="expireTime"><span class="type-signature"></span>expireTime<span class="type-signature"></span></h4>




<div class="description">
    <p>过期时间 UTC时间戳，单位为s, expire_time</p>
</div>

<!--

-->




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






        
            
<h4 class="name" id="keyID"><span class="type-signature">(readonly) </span>keyID<span class="type-signature"> :long</span></h4>




<div class="description">
    <p>keyID</p>
</div>

<!--

    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">long</span>


        </li>
    </ul>

-->




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






        
            
<h4 class="name" id="shareUserID"><span class="type-signature">(readonly) </span>shareUserID<span class="type-signature"> :string</span></h4>




<div class="description">
    <p>分享目标的uid</p>
</div>

<!--

    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">string</span>


        </li>
    </ul>

-->




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






        
            
<h4 class="name" id="status"><span class="type-signature"></span>status<span class="type-signature"> :int</span></h4>




<div class="description">
    <p>分享类别，1：暂时，2：周期，3：永久</p>
</div>

<!--

    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">int</span>


        </li>
    </ul>

-->




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






        
            
<h4 class="name" id="weekdays"><span class="type-signature"></span>weekdays<span class="type-signature"> :Array.&lt;int></span></h4>




<div class="description">
    <p>生效日期（星期几，例如周一和周三对应1和3，[1, 3]，星期天对应0），仅在status=2时不可为空</p>
</div>

<!--

    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">Array.&lt;int></span>


        </li>
    </ul>

-->




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






        
    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    
    <h4 class="name" id="isOutOfDate"><span class="type-signature"></span>isOutOfDate<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    <p>是否过期</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>












<h5></h5><div style="display:none">
 
<h5>Returns:</h5>

        
<div class="param-desc">
    <p>boolean</p>
</div>



    
</div>





        
            

    

    
    <h4 class="name" id="remove"><span class="type-signature"></span>remove<span class="signature">()</span><span class="type-signature"> &rarr; {Promise}</span></h4>
    

    



<div class="description">
    <p>删除 /share/bluetoothkeyshare</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>












<h5></h5><div style="display:none">
 
<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Promise</span>


    </dd>
</dl>

    
</div>





        
            

    

    
    <h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> &rarr; {Promise}</span></h4>
    

    



<div class="description">
    <p>保存 /share/bluetoothkeyshare</p>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>












<h5></h5><div style="display:none">
 
<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Promise</span>


    </dd>
</dl>

    
</div>





        
    

    

    
</article>

</section>




</div>

<br class="clear">

<footer>
    MIOT SDK <a href="https://www.xiaomi.com">@xiaomi</a> 
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>